<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
  <script src="/js/jquery.min.js"></script>
  <link rel="stylesheet" type="text/css" href="/css/intercalate.css" />
<link href="/css/time_style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/jquery.min.js" ></script>
<script type="text/javascript" src="/js/date.js" ></script>
<script type="text/javascript" src="/js/iscroll.js" ></script>
<script type="text/javascript">
$(function(){
	$('#beginTime').date();
});
</script>
  <title>个人信息</title>
  <style>
  	.sys_set p{
		width:14rem;
		margin:.8rem auto;
		padding-bottom:1rem;
		font-size:.7rem;
		position:relative;
		border-bottom:2px solid #EBEBEB;
	}
	.sys_set p > span:nth-of-type(2){
		position:absolute;
		right:0;
	}
	.kbtn{
	width:14rem;
	height:1rem;
	border:0;
	background:rgba(0,0,0,0);
	text-align:right;
	position: absolute;
	right:0;
	font-size: .7rem;
	color: #666;
}
  </style>
 </head>
 <body>
	<section class="sys_set">
		<p class="writeP nickname"><span>昵称</span><span>{{ $info->nickname or '' }}</span></p>
		<p class="sex"><span>性别</span>
		@if(isset($info) && $info->sex == 2)
		<span>女</span>
		@elseif(isset($info) && $info->sex == 1)
		<span>男</span>
		@else
		<span></span>
		@endif
		</p>
		<p class="birthday"><span>生日</span><input id="beginTime" class="kbtn"readonly value="{{ $info->birthday or '' }}" /></p>
		<p class="writeP name"><span>姓名</span><span>{{ $info->name or '' }}</span></p>
		<p class="writeP address"><span>地址</span><span>{{ $info->address or '' }}</p>
		<p class="writeP telephone"><span>电话</span><span>{{ $info->phone or '' }}</p>
		<p class="writeP email"><span>邮箱</span><span>{{ $info->email or '' }}</p>
	</section>
	<section class="footer_btns">
		<a onclick="javascript:history.go(-1);">返回</a>
		<a class="submit_b" >提交</a>
	</section>
	<section class="undbing_bg">
		<section class="undbing_box">
			<p>确定要解绑当前设备吗？</p>
			<section class="cance_btn" >取消</section>
			<section class="ok_btn">确定</section>
		</section>
	</section>
	<section class="info_bg">
		<section class="info_box">

			<p class="info_title"></p>
			<p class="edit_box" contenteditable="true" ></p>
			<section class="Bomb_btn">
				<a class="info_no" >取消</a>
				<a class="info_yes">确定</a>
			</section>
		</section>
	</section>
	<section class="sex_bg">
		<section class="sex_box">
			<p class="sex_title" style="text-align:center;">性别</p>
			<p class="sex_item">男</p>
			<p class="sex_item">女</p>
			<section class="sex_btn">
				<a class="sex_no" >取消</a>
				<a class="sex_yes">确定</a>
			</section>
		</section>
	</section>
	<!-- 提交信息服务器反馈信息-->
	<section class="hint_bg">
		<section class="hint_box">
			<p class="hint_text"></p>
			<section class="hint_btn">确定</section>
		</section>
	</section>
	<div id="datePlugin"></div>
	<script src="/js/publick.js"></script>
 </body>
</html>
<script>
$('.submit_b').click(function(){
    var w_nickname = $('.nickname').children("span").eq(1).html();
    var w_sex = $('.sex').children("span").eq(1).html();
    var w_birthday = $('.birthday').children("input").val();
    var w_name = $('.name').children("span").eq(1).html();
    var w_address = $('.address').children("span").eq(1).html();
    var w_phone = $('.telephone').children("span").eq(1).html();
    var w_email = $('.email').children("span").eq(1).html();
    $.ajax({
        url:"/api/user/add",
        type:"post",
        data:{
            'nickname':w_nickname,
            'sex':w_sex,
            'birthday':w_birthday,
            'name':w_name,
            'address':w_address,
            'phone':w_phone,
            'email':w_email,
        },
        dataType:"json",
        success:function(data){
            if(data.status.errCode == 0){
                hint('提交成功');
            }else{
            	hint(data.status.message);
            }
        }
    });
});
</script>
